﻿<phone:PhoneApplicationPage
    x:Class="QuickWeb.SettingsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:local="clr-namespace:QuickWeb"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True"
    shell:SystemTray.Opacity="0.0"
    
   >
    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:SwivelTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:SwivelTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:SwivelTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:SwivelTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <!--<phone:PhoneApplicationPage.Resources>
        <local:AppSettings x:Key="appSettings"></local:AppSettings>
    </phone:PhoneApplicationPage.Resources>-->


    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <phone:Pivot x:Name="pivot"
            Title="{Binding Path=LocalizedResources.appTitle, Source={StaticResource LocalizedStrings}}" 
            Loaded="pivot_Loaded" >

            <!--Quick search item-->
            <phone:PivotItem x:Name="searchPivot"  >
                <phone:PivotItem.Header >
                    <TextBlock 
                        Text="{Binding Path=LocalizedResources.settings, Source={StaticResource LocalizedStrings}}"                                                
                                            
                    />
                </phone:PivotItem.Header>
                <Grid x:Name="ContentPanel" Grid.Row="1" >

                    <Grid.RowDefinitions>                        
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    
                    <toolkit:ListPicker 
                        x:Name="startPivotSelectList"  
                        Grid.Row="0" 
                        Header="{Binding Path=LocalizedResources.SelectStartPivot, Source={StaticResource LocalizedStrings}}"
                    >
                        <toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.startPageSearch, Source={StaticResource LocalizedStrings}}" />
                        <toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.startPageRead, Source={StaticResource LocalizedStrings}}" />
                        <toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.startPageClips, Source={StaticResource LocalizedStrings}}" />
                    </toolkit:ListPicker>

                    <toolkit:ListPicker 
                        x:Name="browserSelectList"  
                        Grid.Row="1" 
                        Header="{Binding Path=LocalizedResources.SelectSearchEngine, Source={StaticResource LocalizedStrings}}"
                    >
                        <toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.BingSearch, Source={StaticResource LocalizedStrings}}" />
                        <toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.GoogleSearch, Source={StaticResource LocalizedStrings}}" />
                        <toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.DuckDuckGoSearch, Source={StaticResource LocalizedStrings}}" />
                    </toolkit:ListPicker>
                    
                    <toolkit:ToggleSwitch 
                        x:Name="UpdateFeedsOnOpenToggle" 
                        Grid.Row="1" 
                        Header="{Binding Path=LocalizedResources.UpdateFeedsConf, Source={StaticResource LocalizedStrings}}"
                        Checked="UpdateFeedsOnOpenToggle_Checked"
                        Unchecked="UpdateFeedsOnOpenToggle_Unchecked"
                        Visibility="Collapsed"
                    />
                    <toolkit:ListPicker 
                        x:Name="LoadImagesList"  
                        Grid.Row="2" 
                        Header="{Binding Path=LocalizedResources.LoadImages, Source={StaticResource LocalizedStrings}}"
                    >
                        <toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.NoLoadFeedsImage, Source={StaticResource LocalizedStrings}}" />
                        <toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.AlwaysLoadFeedsImage, Source={StaticResource LocalizedStrings}}" />
                        
                        <!--<toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.LoadFeedsImageOnlyInWifi, Source={StaticResource LocalizedStrings}}" />-->
                        
                    </toolkit:ListPicker>
                    
                    <!--<toolkit:ToggleSwitch 
                        x:Name="LoadImagesToggle" 
                        Grid.Row="2" 
                        Header="{Binding Path=LocalizedResources.LoadImages, Source={StaticResource LocalizedStrings}}"
                        Checked="LoadImagesToggle_Checked"
                        Unchecked="LoadImagesToggle_Unchecked"
                    />-->
                    <toolkit:ListPicker 
                         x:Name="SelectPreviewMaxLengthList"  
                        Grid.Row="3" 
                        Header="{Binding Path=LocalizedResources.MaxPreviewDescriptionLength, Source={StaticResource LocalizedStrings}}"
                    >
                        <toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.MPL_200, Source={StaticResource LocalizedStrings}}" />
                        <toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.MPL_500, Source={StaticResource LocalizedStrings}}" />
                        <toolkit:ListPickerItem Content="{Binding Path=LocalizedResources.MPL_NoLimit, Source={StaticResource LocalizedStrings}}" />
                    </toolkit:ListPicker>


                </Grid>




            </phone:PivotItem>



        </phone:Pivot>
    </Grid>
    
</phone:PhoneApplicationPage>